package com.skb.core.service;

import com.skb.core.dao.CrudDao;
import com.skb.core.model.UserRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;

@Service("userRoleService")
public class RoleUserService implements IRoleUserService {

@Autowired
private CrudDao<UserRole> userRoleDao;

    @Transactional
    @Override
    public UserRole create(UserRole userRole) {
        return userRoleDao.create(userRole);
    }

    @Transactional
    @Override
    public UserRole get(Serializable id) {
        return userRoleDao.get(id);
    }

    @Transactional
    @Override
    public UserRole update(UserRole userRole) {
        return userRoleDao.update(userRole);
    }

    @Transactional
    @Override
    public void delete(UserRole userRole) {
        userRoleDao.delete(userRole);
    }
}
